﻿import QtQuick 2.0

import "../../common"
import "../../../js/util.js" as Util
import "../../../js/UI.js" as UI

BaseDialog {
    property int timeroutTimes: 3
    property var finishedcallback: null
    Timer {
        id: m_timer
        interval: 1000
        running: true
        repeat: true
        onTriggered: {
            timeroutTimes--
            if (timeroutTimes == 0) {
                subpageSignal(1,-1)
                finishedcallback()
                quitsignal();
            } else {
                label.text = qsTr("修改成功,(%1)秒后重新登录...").arg(timeroutTimes)
            }
        }
    }
    Rectangle {
        id: contentRect
        anchors.centerIn: parent
        width: parent.width - (UI.LeftScale + UI.RightScale) * m_lineValue * 2
        height: 2 * m_lineValue
        radius: height*0.1

        AText {
            id: label
            color: UI.TextNumColorOne
            font.pointSize: 20
            width: parent.width*0.9
            wrapMode: Text.WrapAnywhere
            anchors.centerIn: parent
            horizontalAlignment: Text.AlignHCenter
            text: qsTr("修改成功,(3)秒后重新登录...")
        }
    }
}

